package com.action.h5;

import com.bean.ResponseBean;
import com.pojo.Zixun;
import com.service.MajortypeService;
import com.service.ZixunService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;
import java.util.List;

/**
 * h5页面查询专业
 * @author Liao
 */
@RestController
@RequestMapping("/h5")
public class Majorh5Action {
    @Autowired
    private  MajortypeService majortypeService;

    /**
     * h5页面查询专业
     * @return
     */
    @RequestMapping("/majors")
    public ResponseBean majors(){
        List list = majortypeService.list();
        if(list.size()>0){
            return  new ResponseBean(200,"查询成功",list);
        }else{
            return  ResponseBean.error("没有数据");
        }
    }

}
